package org.wheel.plugins.toolkit.sql.core;

import org.wheel.plugins.toolkit.sql.render.ParamRenderStrategy;
import org.wheel.plugins.toolkit.util.sql.SQLHelper;

import java.util.LinkedHashMap;
import java.util.Map;

public abstract class AbstractParamRender implements ParamRenderStrategy {
    protected final LinkedHashMap<String, Object> paramMap;

    protected AbstractParamRender(LinkedHashMap<String, Object> paramMap) {
        this.paramMap = paramMap;
    }

    @Override
    public Object getParamObject() {
        return SQLHelper.resolveParameters(paramMap);
    }

    @Override
    public Map<String, Object> getParamMap(){
        return paramMap;
    }

}